From e778931f5a98a01f8b13db5e2933f881ff042f62 Mon Sep 17 00:00:00 2001 From: Drew Parsons Date: Thu, 5 Feb 2026 18:28:24 +0100 Subject: [PATCH] add debian patch matplotlib_nullptr_s390x.patch handles case of null ScalarPointer in image in vtkMatplotlibMathTextUtilities::RenderOneCell A null pointer was generated on s390x causing pyvista test_add_text_latex to segfault. See upstream #19931 https://gitlab.kitware.com/vtk/vtk/-/issues/19931 Closes: #1126861 --- debian/changelog | 9 +++++++++ debian/patches/matplotlib_nullptr_s390x.patch | 17 +++++++++++++++++ debian/patches/series | 1 + 3 files changed, 27 insertions(+) create mode 100644 debian/patches/matplotlib_nullptr_s390x.patch diff --git a/debian/changelog b/debian/changelog index 6fd1ba51b..b07139269 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +vtk9 (9.5.2+dfsg3-6) UNRELEASED; urgency=medium + + * debian patch matplotlib_nullptr_s390x.patch handles case of null + ScalarPointer in image in vtkMatplotlibMathTextUtilities::RenderOneCell + A null pointer was generated on s390x causing pyvista + test_add_text_latex to segfault. Closes: #1126861 + + -- Drew Parsons Thu, 05 Feb 2026 18:20:15 +0100 + vtk9 (9.5.2+dfsg3-5) unstable; urgency=medium * Team upload. diff --git a/debian/patches/matplotlib_nullptr_s390x.patch b/debian/patches/matplotlib_nullptr_s390x.patch new file mode 100644 index 000000000..090930072 --- /dev/null +++ b/debian/patches/matplotlib_nullptr_s390x.patch @@ -0,0 +1,17 @@ +Index: vtk9/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx +=================================================================== +--- vtk9.orig/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx 2026-01-25 23:22:22.741023671 +0100 ++++ vtk9/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx 2026-02-05 12:10:11.414134274 +0100 +@@ -1029,6 +1029,12 @@ + { + unsigned char* ptr = static_cast(image->GetScalarPointer(col, row, 0)); + ++ if (ptr == nullptr) ++ { ++ vtkErrorMacro("image returned null ScalarPointer."); ++ return false; ++ } ++ + // Background, do not load python data + if (row > pythonRowStart || col < pythonColStart || row <= pythonRowEnd || + col >= pythonColEnd) diff --git a/debian/patches/series b/debian/patches/series index 70678eba9..e6c09e9e6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,3 +12,4 @@ 100_add_missing_gl_header.patch 121_add_support_for_loong64.patch findEXPAT_version_fix_MR12826.patch +matplotlib_nullptr_s390x.patch -- 2.30.2